home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / amac34.arc / SET12.QM < prev    next >
Text File  |  1991-02-16  |  2KB  |  58 lines

  1. *                               SET12.QM, v1.2a
  2. *
  3. *             @0 - Macro To Get Dos Envirnoment Variable
  4. *
  5. * This QEdit macro shows a technique to access a Dos environment
  6. * variable while editing a file with QEdit. To run, press Alt_0 and the
  7. * variable and it's name will show highlighted on the screen. Press
  8. * 'Enter' to remove from the screen. This macro is based on a
  9. * suggestion how to do this from Tim Farley of SemWare.
  10. *
  11. * Change 'COMSPEC' below to the variable you wish to find. Replacing
  12. * "COMSPEC" altogether with 'pause' line will allow the user to input
  13. * enough letters for the Dos environment variable to be found.
  14. *
  15. * The macro will also run faster if 'C:' below is changed to a ram disk.
  16. *
  17. * See SRCHxx.QM for using Dos environment variables in other macros.
  18. *
  19. * For other macros, see ALLMACRO.INF.
  20. * To BEGIN, just type "START SET" <Enter>. All pertinent files will be
  21. * loaded in the "Ring" for viewing, and SET12.MAC is read.
  22. * Alternatively, type "START SET 0" <Enter> and the disk copies of all
  23. * files in the "Ring" will be loaded ready for editing, saving time.
  24.  
  25.  
  26.  
  27.  
  28. *
  29. @0 macrobegin
  30.         unmarkblock                     * get ready
  31.         DOS "set>c:$" return return     * get SET to tempfile
  32.         editfile "c:$" return           * load tempfile
  33. *       find  pause return return       * input variable to find
  34.         find  "COMSPEC" return return  ** search for COMSPEC **change**
  35.         begline dropanchor              * go to found begin/start mark
  36.         endline                         * mark it all
  37.         copy                            * get to scrap
  38.         killfile quit                   * kill/quit temp for next time
  39.         Find paste Pause Escape         * Show variable in Find window
  40. *
  41. * 57 bytes Fri  10-26-1990  00:13:22
  42.  
  43.  
  44.  
  45.  
  46. * Version History:
  47. *
  48. *       1.0a - Changed documentation
  49. *       1.0b - Changed other file names in series, this is an update.
  50. *       1.1  - Shortened macro
  51. *       1.1a - Modified this file documentation
  52. *       1.2  - Replaced misssing "COMSPEC" line in macro
  53. *            - Modified to show environment variable in Find window
  54. *              to not change file.
  55. *       1.2a - Modified documentation and added START.BAT.
  56.  
  57. * Tom Hogshead  Wed  10-31-1990
  58.